package com.xidian.GMS.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xidian.GMS.entity.Users;
import com.xidian.GMS.mapper.UsersMapper;
import com.xidian.GMS.service.RegisterService;

@Service
public class RegisterServiceImpl implements RegisterService {
	
	@Autowired
	private UsersMapper usermapper;

	@Override
	public boolean Register(Users user) {
		int x = usermapper.insertSelective(user);
		boolean flag = false;
		if( x == 1 ){
			flag = true;
		}
			
		return flag;
	}

	@Override
	public boolean repassword(Users user) {

        int x = usermapper.updateByPrimaryKeySelective(user);
        boolean flag = false;
		if( x == 1 ){
			flag = true;
		}
			
		return flag;
	}

	
}
